package com.victualler.product.employee.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.victualler.core.base.dao.BaseDao;
import com.victualler.core.common.annotation.InitEditColumn;
import com.victualler.core.common.annotation.ListShowColumn;
import com.victualler.core.common.enums.ColumnFormatEnum;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

@Entity
@Table(name="employee")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class EmployeeDao extends BaseDao implements Serializable {
    //头像
    @ListShowColumn(title = "头像",sort = 0,type = ColumnFormatEnum.IMAGE)
    @InitEditColumn(title = "头像",sort = 0,type = ColumnFormatEnum.IMAGE)
    private Long imgId;
    //工号
    @Column(nullable = false)
    @ListShowColumn(title = "工号",sort = 1)
    @InitEditColumn(title = "工号",sort = 1)
    private String workNo;
    //员工姓名
    @Column(nullable = false)
    @ListShowColumn(title = "员工姓名",sort = 2)
    @InitEditColumn(title = "员工姓名",sort = 2)
    private String name;
    //年龄
    @ListShowColumn(title = "年龄",sort = 3)
    @InitEditColumn(title = "年龄",sort = 3)
    private String age;
    //性别
    @ListShowColumn(title = "性别",sort = 4,type = ColumnFormatEnum.DICT,dictCodeType = "GenderType")
    @InitEditColumn(title = "性别",sort = 4,type = ColumnFormatEnum.DICT,dictCodeType = "GenderType")
    private String gender;
    //入职日期
    @InitEditColumn(title = "入职日期",sort = 5,type = ColumnFormatEnum.DATE)
    private String inDate;
    //离职日期
    @InitEditColumn(title = "离职日期",sort = 5,type = ColumnFormatEnum.DATE,required = false)
    private String outDate;
    //学历(学位)
    @ListShowColumn(title = "学历",sort = 6,type = ColumnFormatEnum.DICT,dictCodeType = "DegreeType")
    @InitEditColumn(title = "学历",sort = 6,type = ColumnFormatEnum.DICT,dictCodeType = "DegreeType")
    private String degree;
    //毕业院校
    @ListShowColumn(title = "毕业院校",sort = 7)
    @InitEditColumn(title = "毕业院校",sort = 7)
    private String school;
    //职位(字典类型)
    @ListShowColumn(title = "职位",sort = 8,type = ColumnFormatEnum.DICT,dictCodeType = "PositionType")
    @InitEditColumn(title = "职位",sort = 8,type = ColumnFormatEnum.DICT,dictCodeType = "PositionType")
    private String position;
    //工龄
    @InitEditColumn(title = "工龄",sort = 9)
    private String workYear;
    //身份证号
    @InitEditColumn(title = "身份证号",sort = 10)
    private String idCard;
    //出生日期
    @InitEditColumn(title = "出生日期",sort = 11,type = ColumnFormatEnum.DATE)
    private String birthday;
    //所属机构
    @InitEditColumn(title = "所属机构",sort = 12,required = false)
    private Long departmentId;
    //登陆账户
    private String loginAccount;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getWorkNo() {
        return workNo;
    }

    public void setWorkNo(String workNo) {
        this.workNo = workNo;
    }

    public Long getImgId() {
        return imgId;
    }

    public void setImgId(Long imgId) {
        this.imgId = imgId;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getInDate() {
        return inDate;
    }

    public void setInDate(String inDate) {
        this.inDate = inDate;
    }

    public String getOutDate() {
        return outDate;
    }

    public void setOutDate(String outDate) {
        this.outDate = outDate;
    }

    public String getWorkYear() {
        return workYear;
    }

    public void setWorkYear(String workYear) {
        this.workYear = workYear;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public Long getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Long departmentId) {
        this.departmentId = departmentId;
    }


    public String getDegree() {
        return degree;
    }

    public void setDegree(String degree) {
        this.degree = degree;
    }


    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }


    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getLoginAccount() {
        return loginAccount;
    }

    public void setLoginAccount(String loginAccount) {
        this.loginAccount = loginAccount;
    }
}
